<?php
namespace app\index\controller;
use think\Controller;

use think\facade\Session;

class Base extends Controller
{
    public function initialize()
    {
    	//判断是否登录
        if($this->isLogin() === false) {
            return $this->redirect('/waplogin');
        }
    }

    /**
     * [isLogin  判定是否登录]
     * @author [TRC南風]
     * @return bool
     */
    public function isLogin() {

        //获取session
        $user = Session::has(config("wap.session_wapuser"));

        if($user==true) {

            return true;
        }

        return false;
    }
}
